home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 006a / ca22.zip / CA.DOC next >
Text File  |  1992-01-14  |  23KB  |  542 lines

  1.                                 CA 2.2
  2.  
  3.                    Resident four function calculator
  4.  
  5.                                   by
  6.                                Bob Eyer
  7.                              [73230,2620]
  8.  
  9.                              Jan 14, 1992
  10.  
  11.      ┌────────────────────────────────────────────────────────────┐
  12.      │ WARNING: THIS SOFTWARE MAY NOT WORK PROPERLY WITH CERTAIN  │
  13.      │          APPLICATIONS.  SEE CAUTION BELOW.                 │
  14.      └────────────────────────────────────────────────────────────┘
  15.  
  16.                         ** SHAREWARE NOTICE **
  17.  
  18.      This program is shareware: if you think it's a worthy addition  to
  19.      your  personal  software,  you  should  register  with the author.
  20.      Register this one, and you get a disk full of  some  of  the  best
  21.      utilities in the business FOR FREE!!
  22.  
  23.      The registered version of CA lacks the "Please register!" note  on
  24.      return  of  results from the Accumulator.  See Accumulator section
  25.      below on how to display or paste the result.
  26.  
  27.      Simply  make  out  a  money  order  in the amount of $20 US to Bob
  28.      Eyer and send with your return address to:
  29.  
  30.        Bob Eyer
  31.        1100 Bloor Street West
  32.        Suite 16
  33.        Toronto, Canada M6H 1M8
  34.  
  35.      Please mention in your accompanying note whether you wish 5.25" or
  36.      3.5" diskette format,  and  state  the  name  in  which  you  wish
  37.      registration-only  utilities  to  be  registered.  [Certain of the
  38.      most important items have never been posted  and  are  distributed
  39.      only through the registration.]
  40.  
  41.      Enquiries may be placed by  writing  directly  to  the  author  at
  42.      Compuserve userid [73230,2620].
  43.  
  44.      Warranty and Disclaimer:
  45.      -----------------------
  46.      The  author,  Bob  Eyer,  guarantees the physical integrity of the
  47.      diskette covering the points  above,  and  will  replace  free  of
  48.      charge, if it is received defective.  However, in no case will the
  49.      author  be  responsible for any damages due to loss of data or any
  50.      other reason.  In no event does the  author's  liability  for  any
  51.      damages  exceed  the  price  paid  for  the  buyer's order of this
  52.      software, regardless of the form of the claim.  The  person  using
  53.      the  software  bears all risk as to the quality and performance of
  54.      the software.
  55.  
  56.      See  Program  Listing  at  end  of  documentation  for the primary
  57.      benefits of registering.
  58.  
  59.  
  60.  
  61.  
  62.      Help screen
  63.      -----------
  64.  
  65.      Syntax: CAF [/U]               /U = unload from memory
  66.  
  67.      Hotkey: Rightshift-/
  68.  
  69.      Binary operations:  +  -  *  /  ^
  70.  
  71.      Accumulator: ADD    [Esc to exit]
  72.  
  73.      Modes: x PLACES   COLOR y   E 0     N D
  74.      Review: ST
  75.  
  76.      See the note about Errors below.
  77.  
  78.  
  79.      INTRODUCTORY NOTE: CA is the 4-function fixed-point alternative to
  80.      CAF  (see  program  listing at end of this doc file).  CA supports
  81.      just four functions  (addition,  subtraction,  multiplication  and
  82.      division)  plus an accumulator for performing many additions.  The
  83.      advantage  of  CA  is  that  it uses only about 13K of memory; CAF
  84.      requires  about  27K.   The  disadvantage  is  that  it  has  only
  85.      single-precision  range  and  accuracy,  and  is restricted to the
  86.      standard array of arithmetic functions.
  87.  
  88.      The  new  version  of CA adds an Accumulator and introduces a more
  89.      sophisticated input routine which has sensitivity to the  Esc  key
  90.      and destructive backspace for window editing purposes.
  91.  
  92.      IMPORTANT:  This  program  does not provide a menu or picture of a
  93.      calculator - so as to avoid obscuring portions of  the  underlying
  94.      editing  application,  and  to  avoid requiring the user to employ
  95.      only 25 x 80 screens (some TSR calculators require this,  to  make
  96.      use  of  Line  25 for calculator monitoring).  CA responds equally
  97.      well in 50 x 80 or 44 x 132 video environments; generally,  it  is
  98.      indifferent to the manner in which the video raster is defined.
  99.  
  100.      CA is designed to respond  just  to  the  hotkey,  which  provides
  101.      merely  a  'calculation  window',  in  which  the  user enters his
  102.      calculations or mode changes.  Hitting  ENTER  after  supplying  a
  103.      calculation  or mode change to the window, simply executes the job
  104.      and returns to the application.  Where a result is  generated,  it
  105.      is  pasted directly to the underlying application where the cursor
  106.      was last located.
  107.  
  108.      In  examples  seen  below,  EACH  calculation  or  mode  change is
  109.      preceded by invoking the hotkey.  This, however, does not apply to
  110.      the Accumulator (see below).
  111.  
  112.      CA is also designed to return the cursor to the  initial  position
  113.      in the same window, to permit making mode adjustments without line
  114.      skipping.   Once  a  task  is  completed,  you may exit the window
  115.      merely by hitting ENTER  one  additional  time  or  by  using  the
  116.      spacebar  to  delete the window.  The old window always disappears
  117.      in an editing environment after the  result  is  injected  to  the
  118.      text, but mode change information will, in general, remain.
  119.  
  120.      Modes/review
  121.      ------------
  122.      CA  provides  four  groups  of mode selections - number of decimal
  123.      places to which to round results, colour  of  calculation  window,
  124.      whether  to display results in scientific notation, and whether to
  125.      echo the result to display or paste to text.
  126.  
  127.      The  current mode situation may be viewed simply by entering ST in
  128.      the calculation window (ST is short for 'status').
  129.  
  130.      Mode changes are entered directly in the  calculation  window  and
  131.      the  new  mode  specs  are resummarised in the calculation window,
  132.      just as though ST had been issued.
  133.  
  134.      x PLACES:
  135.      Entry  of  '5  places'  in the calculation window will cause CA to
  136.      operate so as to round pasted  results  to  five  decimal  places.
  137.      Entry  of '0 places' means that no formatting will occur; that is,
  138.      results will appear with the maximum precision stuffable into  the
  139.      keyboard buffer at one pass.  The default value for Places is 0.
  140.  
  141.      The maximum number of places is 6.
  142.  
  143.      COLOR y:
  144.      Entry of 'COLOR 30' will cause the calculation window  to  have  a
  145.      bright  yellow  foreground  and  a  blue  background.   For colour
  146.      details see below.  The default colour scheme is  black  on  white
  147.      (112).   Color  0  automatically  converts  to 112, so as to avoid
  148.      black on black.
  149.  
  150.      E/0:
  151.      Entry  of E in the window will cause results to be exhibited using
  152.      scientific notation.  When E is set, CA will default Places to  6.
  153.      When 0 is entered, scientific notation is removed, but places will
  154.      remain as before.
  155.  
  156.      N/D:
  157.      N means normal, and D means display.  N is  the  default.   Normal
  158.      mode  injects  results to the underlying application; display mode
  159.      echoes  results  to the screen without pasting to the application.
  160.  
  161.      CA's variable review
  162.      --------------------
  163.      Whether  in  the regular calculation window or in the Accumulator,
  164.      the user may retrieve a variable, simply  by  entering  its  name.
  165.      (See below about CA's "store/recall" facility).
  166.  
  167.      Binary operations
  168.      -----------------
  169.      CA  supports  four two-variable ('binary') operations: + - * /, or
  170.      add, subtract, multiply, and divide.  For example,
  171.  
  172.      1991-1917          [= 74
  173.  
  174.      Entry of numbers using scientific notation is not supported by CA.
  175.  
  176.      Additional examples:
  177.  
  178.      35/34              [= 1.0294117
  179.      35*34              [= 1190
  180.  
  181.      Automatic store/recall
  182.      ----------------------
  183.      If  you  are  doing  several calculations which involve use of the
  184.      same  term,  you  may  reduce  typing  further by using variables.
  185.      Calculation window variables are A, B,  and  C.   The  first  time
  186.      you  execute  a  calculation  with  numbers,  the  first number is
  187.      always stored into A, the second number into  B,  and  the  result
  188.      into  C.   These  values can be re-used, simply by employing these
  189.      variables in subsequent calculations [except, of course,  for  the
  190.      fact  that,  as  each new calculation is done, the value of C will
  191.      be  updated  with the new result].
  192.  
  193.      Example (after entering '3 PLACES' and then 'E' in the window):
  194.  
  195.      Suppose we wish to perform the following calculations -
  196.  
  197.      34.21102 x 435, and
  198.      34.21102 / 355.5
  199.  
  200.      Here,  each  calculation  uses  the same initial term.  We proceed
  201.      as  follows,  each  time by hitting Rightshift-slash, and entering
  202.      the calculation shown:
  203.  
  204.      34.21102 * 435     [= 1.488e+4
  205.      a/355.5            [= 9.623e-2
  206.  
  207.      The second calculation above could be repeated merely by entering
  208.  
  209.      a/b
  210.  
  211.      The user may also proceed to obtain results for  the  other  three
  212.      operations, using the same numbers, as follows:
  213.  
  214.      a*b                [= 1.216e+4
  215.      a+b                [= 3.897e+2
  216.      a-b                [= -3.213e+2
  217.  
  218.      The  output  C-variable  can  also  be  used in calculations.  For
  219.      example, we may first calculate with no scientific notation
  220.  
  221.      2/3                [= 0.667 ]
  222.  
  223.      Here, A = 2, B = 3, and C is the result in brackets.  Now,  if  we
  224.      multiply the result C by 3, we should get back the numerator A:
  225.  
  226.      C * 3              [= 2.000
  227.  
  228.      This   example   illustrates  the  fact  that  CA,  like  handheld
  229.      calculators with the store/recall function, stores  results  in  a
  230.      separate  register  before rounding.  It is this separate register
  231.      that  is  used  for  input,  when  the  user  employs   C   in   a
  232.      calculation.  [otherwise, the user might get back 2.001].
  233.  
  234.      This  type  of  'result protection' on use of a previous result is
  235.      not, however, found in most TSR calculators.
  236.  
  237.  
  238.      Accumulator
  239.      -----------
  240.      Entry  of the keyword ADD in the calculation window, will transfer
  241.      control to a special area of CA, which displays the following type
  242.      of prompt:
  243.  
  244.      >
  245.  
  246.      Use  your  Esc  key  to  exit  accumulator  and return to the main
  247.      window, or paste result to text.
  248.  
  249.      Numbers entered at this prompt  are  totalled,  each  total  being
  250.      echoed  in  the  right  half  of the display.  Hitting the Esc key
  251.      finishes the operation, wipes the special window from  the  screen
  252.      (if  you're  in an editing environment), and injects the result to
  253.      the underlying application.
  254.  
  255.      If  you  have a consecutive series of the same number to add, just
  256.      enter the first one, and then A for each of  the  following  ones.
  257.      The  accumulator always stores the current addend into variable A,
  258.      and the result into C.  Entering C adds  the  previous  result  to
  259.      itself.
  260.  
  261.      In unregistered distribution versions, the Accumulator returns the
  262.      message  "Please  register!"  in the calculation window.  To paste
  263.      the result, just hit the hotkey and enter C.  Registered users are
  264.      spared of  this  minor  inconvenience,  as  well  as  the  opening
  265.      shareware notice.
  266.  
  267.      Prompt Colour
  268.      -------------
  269.      As  stated  above, to change the colour of the calculation window,
  270.      simply enter
  271.  
  272.      COLOR x
  273.  
  274.      in  the  window,  where  x is a COLOR number.  The default is 112,
  275.      which describes black foreground on  a  white  background.   0  is
  276.      impossible  (black  on  black), and so CAF converts that number to
  277.      112 automatically.   Foreground  and  Background  colours  may  be
  278.      determined by using the following table:
  279.  
  280.                   Back     Fore   Bright Fore
  281.                   ----     ----   -----------
  282.      Black           0        0    8
  283.      Blue           16        1    9
  284.      Green          32        2   10
  285.      Cyan           48        3   11
  286.      Red            64        4   12
  287.      Magenta        80        5   13
  288.      Brown          96        6   14
  289.      White         112        7   15
  290.  
  291.  
  292.      The correct COLOR number is found merely by adding the  Foreground
  293.      number  to  the  Background  number  desired.  For example, Bright
  294.      Green on Blue background is 10 + 16 = 26.
  295.  
  296.      Avoid setting COLOR above  127.   Values  above  that  limit  will
  297.      produce blinking displays.
  298.  
  299.      In  my  estimation the COLORs best for the eye are 10, 11, 14, 15,
  300.      26, 27, 30, 31, 74, 75, 78, 79 and 112.  But you  may  have  other
  301.      ideas.   Example,
  302.  
  303.      COLOR 75
  304.  
  305.      sets the window to Bright Cyan on a Red background.
  306.  
  307.  
  308.      Errors
  309.      ------
  310.      CA supports three error reports -
  311.  
  312.      xyz: illegal            - This message  occurs  where your entered
  313.                                instruction, 'xyz', is not recognised by
  314.                                CA.
  315.  
  316.      Zero divide error       - Attempt to divide by zero.
  317.  
  318.      E + number              - When  an  operation   results   in   the
  319.                                internal  truncation  of  a  number  due
  320.                                [E]xceeding the capacity  of  CA's  long
  321.                                integer number system, the paste default
  322.                                is  overridden, and the result displayed
  323.                                to the window with an E prefix.
  324.  
  325.  
  326.      CAUTION
  327.      -------
  328.      Certain types of editors will not work consistently with CA  -  in
  329.      particular,   editors   which   simulate   the  Macintosh  console
  330.      environment, such as the Microsoft DOS 5.0  Editor,  or  Microsoft
  331.      Windows.   The  problem  here  is  not unique to CA, as collateral
  332.      testing of other TSR calculators has  shown.   If  you're  serious
  333.      about computing, don't use graphics user interfaces (GUI's)!
  334.  
  335.      Further,  like  all  memory resident programs, CA is vulnerable to
  336.      compatibility problems which may arise from  its  use  with  other
  337.      TSR's.   If  you  find  you must reboot, try removing other memory
  338.      resident programs from your AUTOEXEC.BAT file, or try changing the
  339.      sequence in  which  they  are  loaded  until  you  find  the  best
  340.      combination.
  341.  
  342.      However,  tests  have  shown  that  CA  is much less vulnerable to
  343.      interrupt collisions and other compatibility problems  than  other
  344.      TSR calculators.
  345.  
  346.      One  category  of  TSR which is almost guaranteed to cause trouble
  347.      for CA (and for any  program  which  stuffs  keystrokes  into  the
  348.      keyboard  buffer)  are programs like 128KEY.COM, which lengthen or
  349.      change the effective size of the keyboard buffer.  Don't use  such
  350.      programs with CA.
  351.  
  352.      CA  is primarily intended to work with editors and wordprocessors,
  353.      and has been tested  on  Wordperfect  5.0,  Galaxy  2.42,  Captain
  354.      Blackbeard 1.13, SLED 1.1, QEDIT 2.08, pEDIT 2.10, and a number of
  355.      other   editors/wordprocessors,   with  no  confirmed  problem  or
  356.      abnormality.
  357.  
  358.      CA is recommended for use as  the  last  memory  resident  program
  359.      loaded,  so  as  to permit the use of the /U commandline option to
  360.      unload it from  memory,  and  only  in  standard  text-editing  or
  361.      wordprocessing  applications.  Unless you have found that CA works
  362.      with your non-standard application, it  is  recommended  that  you
  363.      take  the  precaution  of  unloading  CA before you invoke such an
  364.      application.
  365.  
  366.  
  367.  
  368.     DESCRIPTION OF PROGRAMS YOU WILL RECEIVE FREE WITH YOUR REGISTRATION
  369.           ********************************************************
  370.  
  371.      Many  of the programs in the following list have not been publicly
  372.      posted, and those which have been posted previously  are  unlikely
  373.      to be posted in new updates, except in rare cases.
  374.  
  375.      Certain  programs  are  registered-only, which means that the user
  376.      must not post copies on bulletin boards.  Some of these have  also
  377.      never  been  posted  at  all, and are available ONLY to registered
  378.      users.  All of  the  non-posted  programs  are  continually  being
  379.      updated,  as  they  are  in  constant use by the author.  The ones
  380.      which have never been been posted are marked by double asterisk.
  381.  
  382.      Versions new since last public post are indicated with a + sign.
  383.  
  384.      Nearly   all  file-processing  programs  take  full  advantage  of
  385.      wildcard logic, including DOS  shortcuts,  keeping  keystrokes  to
  386.      absolute minimum.
  387.  
  388.      Total  size  in  compressed form for all of below, including docs:
  389.      about 320K.
  390.  
  391.   ** MG
  392.      --
  393.      Moving average ASCII graphing program.   Especially  designed  for
  394.      obtaining  graphic  updates  on stock-market activity in practical
  395.      trading environments, in which it is essential that the user get a
  396.      quick  graph  immediately,  with  points  of  the  graph  directly
  397.      associated  with  the  numerical  and other text information which
  398.      these points represent (a feat  impractical  in  Lotus  graphics).
  399.      Designed to be used with SETV below.
  400.  
  401.    + SPC
  402.      ---
  403.      Multidrive columnar drive report, with fairly complete description
  404.      of   your   machine  including  communications,  important  chips,
  405.      printer,  BIOS,   memory,   processor   and   coprocessor   speed,
  406.      multitasking, networking, and so on, all in one single snapshot.
  407.  
  408.      SETV
  409.      ----
  410.      Sets seven VGA text video modes.  Enables Multisync or VGA user to
  411.      make  use  of seven major video text modes at DOS level, including
  412.      132 column modes.
  413.  
  414.      AL
  415.      --
  416.      Best  and  most flexible TSR alarm program with clock option.  Has
  417.      time-locking and a full range of options.  7K of memory.
  418.  
  419.      CA
  420.      --
  421.      Four-function fixed point TSR calculator with  formatted  displays
  422.      and  scientific  notation  for  direct  paste  to  text.  Also has
  423.      accumulator.  Four mode groups.  About 13K of memory.
  424.  
  425.    + CAF
  426.      ---
  427.      TSR floating point calculator with formatted displays  and  direct
  428.      paste  to  text.   18  functions,  and an accumulation area.  Five
  429.      types of modes.  Number formatting.  CAF is the most sophisticated
  430.      calculator in the business, for its size.   27K  of  memory.
  431.  
  432.      PAUZ
  433.      ----
  434.      Replacement for DOS PAUSE, allows specification of seconds to wait
  435.      or target [<=] time,  as  well  as  what  key  to  use  for  pause
  436.      interruption.  User triggering of error levels 1 to 9.
  437.  
  438.    + MV
  439.      --
  440.      Fast  file  mover.   Preserves  date/time/attribute  stamp for all
  441.      moves.  Allows moving Read Only and  Hidden  files,  source  files
  442.      opened  in  SHAREd  mode  for  network  users.   Wildcards.   None
  443.      faster or safer.
  444.  
  445.   ** SPLT
  446.      ----
  447.      ASCII file splitter which, for the first time, offers the  ability
  448.      to  prevent  the  split  from resulting in split messages or other
  449.      defined  text  blocks.   Works  with  DIV  and  REV,  below.
  450.  
  451.   ** OTL
  452.      ---
  453.      Makes it  possible  to  apply  any  set  of  operations,  say,  as
  454.      specified in a batch file, to every file in an ASCII list, without
  455.      having to specify the path information for each file.  For Sysops.
  456.  
  457.    + KALL
  458.      ----
  459.      For users of DOS 3.0-3.2 who would like batch  file  control  like
  460.      that   offered   in   the  more  advanced  DOS  versions.   Allows
  461.      redirection of batch file output, unlike DOS 4/5 CALL.
  462.  
  463.   ** SS
  464.      --
  465.      Secure shell, protects  your  system  from  keyboard  redefinition
  466.      resulting from ANSI codes read in remote message areas.  Maintains
  467.      default DOS colour scheme, but requires use of NANSI.SYS.
  468.  
  469.      DIV
  470.      ---
  471.      Generalisation  of  FGREP-type programs to include blocks of text.
  472.      A single string defines a block in most kinds of  blockable  text.
  473.      DIV  handles  almost  any  kind.  Returns blocks containing one or
  474.      more of up to 64 different strings from large ASCII files.  Useful
  475.      in extracting messages or extended file descriptions containing  a
  476.      range of strings without manual cut and paste.  Can prepare a file
  477.      containing   every   block   EXCEPT   the   ones   selection,  and
  478.      simultaneously.   See REV in short list below.
  479.  
  480.      COMB
  481.      ----
  482.      Sorts and combines wildcard text files  in  specified  order  into
  483.      first  file  found  in  that order.  Primarily for eliminating the
  484.      tedium and error involved in accumulating message files  into  one
  485.      file  for  easy  reference.  Essential for systematic followers of
  486.      international correspondence forums.
  487.  
  488.      ADD
  489.      ---
  490.      Adds very lengthy columns of numbers found in ASCII text, such  as
  491.      byte  counts  in BBS listings without manual data entry.  (Capable
  492.      of handling the addition of up to 1 billion numbers in one pass).
  493.  
  494.      CITM
  495.      ----
  496.      Counts   similar   items  in  formatted  ASCII  lists,  where  the
  497.      similarity is based on a fixed string field found at one  position
  498.      in  each  line of text, and all lines have been previously sorted,
  499.      based on  the  contents  of  that  string  field.   Perfect  as  a
  500.      companion   utility   for  Baker's  QSORT.
  501.  
  502.    + FVER
  503.      ----
  504.      Compares  a  file  list,  like  a BBS listing, to the actual files
  505.      found anywhere in the BBS's download path.  Operates  in  FAST  or
  506.      SLOW mode, depending on your safety requirements.  Can be operated
  507.      remotely through a BBS door.
  508.  
  509.    + MVA
  510.      ---
  511.      Moves  files,  even if set to read only status, from anywhere in a
  512.      specified download path to a given location.  Operates directly on
  513.      ASCII lists, like directories or BBS listings.   Can  be  operated
  514.      remotely through a BBS door.
  515.  
  516.      RNF
  517.      ---
  518.      Minimises keystrokes and keystroke error on  renaming  files  with
  519.      date  or  time  info  or special flags.
  520.  
  521.      plus:
  522.      ----
  523.      ELIM  - Advanced replacement for DEL.
  524.      LCNT  - Very fast linecounter; formatted output.
  525.      ESRT  - Element sorter.  User specified delimiter.
  526.    + TYME  - Program execution timer.
  527.      CHG   - Attribute file/directory/date/time  file  changer/reader.
  528.    + CBRO  - Compuserve Browse converter.  Old/new  formats.
  529.      REV   - Reverses order of blocks of text (messages, etc).
  530.      DTR   - Toggles modem DTR line.
  531.      RTS   - Toggles RTS line.
  532.   ** ENV   - Environment statistics
  533.   ** CFIX  - Fix cursor to normal, block or off.
  534.   ** EL    - Converts number to error level, for batch files.
  535.      WD    - Gives wildcard support to any program.
  536.      SWP   - Fast single-level sweep program.
  537.      TSTF  - Floppy disk status tester.
  538.  
  539.  
  540.      ----------------------
  541.      End of documentation
  542.